<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
		<style type="text/css">
			.my-table,.my-form{
				width: 98%;
				height: 100%;
				margin: 1%;
			}
			.my-row{
				width: 100%;
				height: 32px;
				border-bottom: 1px solid #C7CCD1;
			}
			
			.my-row .my-label{
				width: 100px;
				background: #C7CCD1;
				font-size: 12px;
				font-family: "microsoft yahei";
				color: #FFF;
				text-align: right;
				border-bottom: 1px solid #FFF;
				padding-right: 10px;
			}
			.my-row .my-input input,.my-row .my-input select{
				width: 100%;
				height: 100%;
				border: none;
			}
			.my-row .my-input textarea{
				width: 100%;
				height: 128px;
				border: none;
			}
			.my-button{
				width: 120px;
				height: 32px;
				background: #B8F759;
				border: none;
				color: #FFF;
				margin: auto 20px;
			}
		</style>
	</head>

	<body>

		<div class="my-form">
			<table class="my-table">
				<tr class="my-row">
					<td class="my-label">会话ID</td>
					<td class="my-input">
						<input type="text" name="sessionId" readonly="readonly" value="<%= sessionId %>"/>
					</td>
				</tr>
				<tr class="my-row">
					<td class="my-label">处理人</td>
					<td class="my-input">
						<input type="text" name="jobId" readonly="readonly" value="<%= jobId %>"/>
					</td>
				</tr>
				<tr class="my-row">
					<td class="my-label">业务类型</td>
					<td class="my-input">
						<input type="text" value="<%= business %>"/>
					</td>
				</tr>
				<tr class="my-row">
					<td class="my-label">业务描述</td>
					<td class="my-input">
						<input type="text" name="descr"/>
					</td>
				</tr>
				<tr class="my-row">
					<td class="my-label">解决方案</td>
					<td class="my-input">
						<textarea name="solution"></textarea>
					</td>
				</tr>
				<tr class="my-row">
					<td class="my-label">状态</td>
					<td class="my-input">
						<select name="status">
							<option value="0">其它</option>
							<option value="1">已解决</option>
							<option value="2">待跟进</option>
							<option value="3">不解决</option>
							<option value="4">非业务</option>
						</select>
					</td>
				</tr>
			</table>
			<p style="text-align: center;"><button class="my-button" style="background: #C7CCD1;">清空</button><button name="summary" class="my-button">提交</button></p>
		</div>
		<script type="text/javascript">
			
			$(function(){
				$("button[name='summary']").on("click",function(){
					var data={
						sessionId:"<%= sessionId %>",
						keyId:"<%= keyId %>",
						subject:"",
						descr:$("input[name='descr']").val(),
						solution:$("textarea[name='solution']").val(),
						status:$("select[name='status']").val()
					}
					$.ajax({
						type:"post",
						url:"/session/summary/submit",
						data: JSON.stringify(data),
						contentType: "application/json;charset=utf-8",
						success:function(res){
							var h = top.hh.create({
								timeout: 2000,
								clickToClose: false,
								addnCls: "humane-flatty-success"
							})
							h.log("操作成功");
						}
					})
				})
			})
			
		</script>
	</body>

</html>